#! /usr/bin/env python3

# JACS 0.2
# Created by 賢進学"Kenshin Manabu"

import subprocess
import sys

if (subprocess.call(["grep", "-cq", " 1 \[", "/proc/asound/cards"]) == 0):
	subprocess.call(["jackd", "-R", "-d", "alsa", "-d", "hw:1"])
#	print('Removable') #Test code
else:
	subprocess.call(["jackd", "-R", "-d", "alsa", "-d", "hw:0"])
#	print('System') #Test code
